<template>
  <view class="content bg-white w-screen">
    <HeadShim />
    <ComGroup :list="optionList" />
    <!-- <ComGroup /> -->
    <Popup v-model:show="show" :style="{ padding: '64px' }" position="left">
      内容
      <Button @click="show = false">关闭</Button>
    </Popup>
  </view>
</template>

<script setup>
import HeadShim from "@/components/HeadShim";
import ComGroup from "@/components/ComGroup";
import { systemInfo } from "@/utils/system";

import { ref, getCurrentInstance } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { Popup, Button } from "vant";

const { proxy } = getCurrentInstance();

function usePopUp() {
  const show = ref(false);
  const showPopup = () => {
    show.value = true;
  };
  return { show, showPopup };
}

const optionList = ref([]);
const pageConfig = ref({});

async function initData() {
  const { data } = await proxy._get("index/index");
  const { items: { page, ...list }, pages } = data;

  pageConfig.value = page;
  optionList.value = Object.values(list);
}

const { show, showPopup } = usePopUp();

onLoad(initData);
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
